<template>
	<view class="guide">
		<uni-popup ref="popup" :mask-click="false" type="top">
			<image class="yindao-img" src="https://nabercat.oss-cn-hangzhou.aliyuncs.com/acat-xcx/yindaobeijing.png" mode=""></image>
			<button @click="close" class="yindao-btn">我知道了</button>
		</uni-popup>
	</view>
</template>

<script>
const app = getApp();
import { xZhipop } from '@/api/index.js';
export default {
	data() {
		return {};
	},
	mounted() {
		if (app.globalData.openid) {
			this.xZhipop();
		} else {
			app.getOpenId().then(res => {
				this.xZhipop();
			});
		}
	},
	methods: {
		close() {
			this.$refs.popup.close();
		},
		async xZhipop() {
			const res = await xZhipop({
				openid: app.globalData.openid
			});
			if (res == 1) {
				this.$refs.popup.open();
			}
		}
	}
};
</script>

<style scoped lang="scss">
.yindao-img {
	width: 620rpx;
	height: 532rpx;
	margin: 10rpx auto 254rpx;
}
.yindao-btn {
	width: 368rpx;
	height: 90rpx;
	background: #fa8384;
	border-radius: 16rpx;
	font-size: 36rpx;
	font-weight: 600;
	color: #ffffff;
}
/deep/.uni-transition.data-v-cce16df8 {
	background-color: rgba(0, 0, 0, 0.8) !important;
}
</style>
